class Div < Pan::Component

  def initialize(comp, klass = nil, id_ = nil)
    @comp = comp
    @attrs = {}
    @attrs['class'] = klass if klass
    @attrs['id'] = id_ if id_
  end
    
  def render_on(html)
    html.div(@attrs) {
      html.render(@comp)
    }
  end

  def callbacks_done(chain)
    @comp.callbacks_done(chain << self)
  end

end

